﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Forms;

namespace FeatureModelTool.Windows
{
    /// <summary>
    /// Interaction logic for NewProjectDialog.xaml
    /// </summary>
    public partial class NewProjectDialog : Window
    {
        public bool Dirty { get; protected set; }
        public string ProjectFolderPath { get; protected set; }
        public string ProjectName { get; protected set; }
        public NewProjectDialog()
        {
            InitializeComponent();

            Dirty = false;
            ProjectFolderPath = string.Empty;
            ProjectName = string.Empty;
        }
        /// <summary>
        /// Ok button
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void okButton_Click(object sender, RoutedEventArgs e)
        {
            Dirty = true;
            this.ProjectFolderPath = this.projectFolderPathTextbox.Text;
            this.ProjectName = this.projectNameTextbox.Text;
            this.Close();
        }
        /// <summary>
        /// browse button
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void browseButton_Click(object sender, RoutedEventArgs e)
        {
            FolderBrowserDialog dialog = new FolderBrowserDialog();
            dialog.ShowDialog();

            this.projectFolderPathTextbox.Text = dialog.SelectedPath;

        }
    }
}
